#ifndef __TEXT_H__
#define __TEXT_H__

#include <directfb.h>
#include "dtk_types.h"
#include "dtk_actor.h"

typedef struct _text_select
{
    DInt          start_pos;
    DInt          end_pos;
}TextSelect;

struct _dtk_text{
    DTKActor                base;

    IDirectFBFont*          font;
    DString                 string;
    DInt                    length;
    DString                 font_name;
    DColor                  color;

    DInt                    max_length;
    DUniChar                password_char;
    DBoolean                line_wrap;
    DBoolean                editable;
    DBoolean                single_line;
    DBoolean                activatable;
    DBoolean                selectable;

    TextSelect              selected;
};

#define DTK_TEXT(x) ((DTKText*)(x))

#endif

